package com.sskj.wallet.ui.activity;


import android.widget.Button;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.sskj.common.base.App;
import com.sskj.common.util.ClickUtil;
import com.sskj.lib.RConfig;
import com.sskj.lib.base.BaseActivity;
import com.sskj.wallet.R;
import com.sskj.wallet.R2;
import com.sskj.wallet.presenter.CreateWalletSuccessActivityPresenter;

import butterknife.BindView;

@Route(path = RConfig.WALLET_CREATE_WALLET_SUCCESS)//已成功创建钱包
public class CreateWalletSuccessActivity extends BaseActivity<CreateWalletSuccessActivityPresenter> {
    @BindView(R2.id.btSubmit)
    Button btSubmit;
    @BindView(R2.id.tvDesc)
    TextView tvDesc;
    @Autowired
    boolean isImport;

    @Override
    protected int getLayoutId() {
        return R.layout.wallet_activity_create_wallet_success;
    }

    @Override
    public CreateWalletSuccessActivityPresenter getPresenter() {
        return new CreateWalletSuccessActivityPresenter();
    }

    @Override
    protected void initView() {
        ARouter.getInstance().inject(this);
        ClickUtil.click(btSubmit, () -> {
            ARouter.getInstance().build(RConfig.APP_MAIN).navigation();
            finish();
        });
        if (isImport) {
            tvDesc.setText(App.INSTANCE.getString(R.string.wallet_createWalletSuccessActivity1_j));
        }
    }
}
